﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Modeling_MainMasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["WelcomeUser"] != null)
        {
            lblWelcome.Visible = true;
            lblUsername.Text = Session["WelcomeUser"].ToString();
            lbLogout.Visible = true;
        }
    }
    protected void ibtnHome_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/Default.aspx");
    }
    protected void lbLogout_Click(object sender, EventArgs e)
    {
        Session["StudentID"] = null;
        Session["WelcomeUser"] = null;
        Session["EmployeeID"] = null;
        Session["Role"] = null;

        lblWelcome.Visible = false;
        lbLogout.Visible = false;
        lblUsername.Text = "";
        Response.Redirect("~/Default.aspx");
    }
}
